Optimal. Leaf size=133 \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2-2 a b e^2 n x-2 b^2 e^2 n x \log \left (c x^n\right )-\frac {2 b^2 d^2 n^2}{x}+2 b^2 e^2 n^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2353, 2296, 2295, 2305, 2304, 2302, 30} \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2-2 a b e^2 n x-2 b^2 e^2 n x \log \left (c x^n\right )-\frac {2 b^2 d^2 n^2}{x}+2 b^2 e^2 n^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2295
Rule 2296
Rule 2302
Rule 2304
Rule 2305
Rule 2353
Rubi steps
\begin {align*} \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx &=\int \left (e^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}\right ) \, dx\\ &=d^2 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx+(2 d e) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx+e^2 \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac {(2 d e) \operatorname {Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}+\left (2 b d^2 n\right ) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx-\left (2 b e^2 n\right ) \int \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-\frac {2 b^2 d^2 n^2}{x}-2 a b e^2 n x-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\left (2 b^2 e^2 n\right ) \int \log \left (c x^n\right ) \, dx\\ &=-\frac {2 b^2 d^2 n^2}{x}-2 a b e^2 n x+2 b^2 e^2 n^2 x-2 b^2 e^2 n x \log \left (c x^n\right )-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 107, normalized size = 0.80 \[ -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )+b n\right )}{x}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2-2 b e^2 n x \left (a+b \log \left (c x^n\right )-b n\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.61, size = 291, normalized size = 2.19 \[ \frac {2 \, b^{2} d e n^{2} x \log \relax (x)^{3} - 6 \, b^{2} d^{2} n^{2} - 6 \, a b d^{2} n - 3 \, a^{2} d^{2} + 3 \, {\left (2 \, b^{2} e^{2} n^{2} - 2 \, a b e^{2} n + a^{2} e^{2}\right )} x^{2} + 3 \, {\left (b^{2} e^{2} x^{2} - b^{2} d^{2}\right )} \log \relax (c)^{2} + 3 \, {\left (b^{2} e^{2} n^{2} x^{2} + 2 \, b^{2} d e n x \log \relax (c) - b^{2} d^{2} n^{2} + 2 \, a b d e n x\right )} \log \relax (x)^{2} - 6 \, {\left (b^{2} d^{2} n + a b d^{2} + {\left (b^{2} e^{2} n - a b e^{2}\right )} x^{2}\right )} \log \relax (c) + 6 \, {\left (b^{2} d e x \log \relax (c)^{2} - b^{2} d^{2} n^{2} - a b d^{2} n + a^{2} d e x - {\left (b^{2} e^{2} n^{2} - a b e^{2} n\right )} x^{2} + {\left (b^{2} e^{2} n x^{2} - b^{2} d^{2} n + 2 \, a b d e x\right )} \log \relax (c)\right )} \log \relax (x)}{3 \, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.40, size = 329, normalized size = 2.47 \[ \frac {2 \, b^{2} d n^{2} x e \log \relax (x)^{3} + 3 \, b^{2} n^{2} x^{2} e^{2} \log \relax (x)^{2} + 6 \, b^{2} d n x e \log \relax (c) \log \relax (x)^{2} - 6 \, b^{2} n^{2} x^{2} e^{2} \log \relax (x) + 6 \, b^{2} n x^{2} e^{2} \log \relax (c) \log \relax (x) + 6 \, b^{2} d x e \log \relax (c)^{2} \log \relax (x) - 3 \, b^{2} d^{2} n^{2} \log \relax (x)^{2} + 6 \, a b d n x e \log \relax (x)^{2} + 6 \, b^{2} n^{2} x^{2} e^{2} - 6 \, b^{2} n x^{2} e^{2} \log \relax (c) + 3 \, b^{2} x^{2} e^{2} \log \relax (c)^{2} - 6 \, b^{2} d^{2} n^{2} \log \relax (x) + 6 \, a b n x^{2} e^{2} \log \relax (x) - 6 \, b^{2} d^{2} n \log \relax (c) \log \relax (x) + 12 \, a b d x e \log \relax (c) \log \relax (x) - 6 \, b^{2} d^{2} n^{2} - 6 \, a b n x^{2} e^{2} - 6 \, b^{2} d^{2} n \log \relax (c) + 6 \, a b x^{2} e^{2} \log \relax (c) - 3 \, b^{2} d^{2} \log \relax (c)^{2} - 6 \, a b d^{2} n \log \relax (x) + 6 \, a^{2} d x e \log \relax (x) - 6 \, a b d^{2} n + 3 \, a^{2} x^{2} e^{2} - 6 \, a b d^{2} \log \relax (c) - 3 \, a^{2} d^{2}}{3 \, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.56, size = 2521, normalized size = 18.95 \[ \text {Expression too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.63, size = 200, normalized size = 1.50 \[ b^{2} e^{2} x \log \left (c x^{n}\right )^{2} - 2 \, a b e^{2} n x + 2 \, a b e^{2} x \log \left (c x^{n}\right ) + \frac {2 \, b^{2} d e \log \left (c x^{n}\right )^{3}}{3 \, n} + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} e^{2} - 2 \, b^{2} d^{2} {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} + a^{2} e^{2} x + \frac {2 \, a b d e \log \left (c x^{n}\right )^{2}}{n} - \frac {b^{2} d^{2} \log \left (c x^{n}\right )^{2}}{x} + 2 \, a^{2} d e \log \relax (x) - \frac {2 \, a b d^{2} n}{x} - \frac {2 \, a b d^{2} \log \left (c x^{n}\right )}{x} - \frac {a^{2} d^{2}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.74, size = 228, normalized size = 1.71 \[ \ln \relax (x)\,\left (2\,d\,e\,a^2+4\,d\,e\,a\,b\,n+4\,d\,e\,b^2\,n^2\right )-\frac {a^2\,d^2+2\,a\,b\,d^2\,n+2\,b^2\,d^2\,n^2}{x}-\ln \left (c\,x^n\right )\,\left (\frac {2\,b\,\left (a+b\,n\right )\,d^2+4\,b\,\left (a+b\,n\right )\,d\,e\,x+2\,b\,\left (a-b\,n\right )\,e^2\,x^2}{x}-4\,b\,e^2\,x\,\left (a-b\,n\right )\right )+{\ln \left (c\,x^n\right )}^2\,\left (2\,b^2\,e^2\,x-\frac {b^2\,d^2+2\,b^2\,d\,e\,x+b^2\,e^2\,x^2}{x}+\frac {2\,b\,d\,e\,\left (a+b\,n\right )}{n}\right )+e^2\,x\,\left (a^2-2\,a\,b\,n+2\,b^2\,n^2\right )+\frac {2\,b^2\,d\,e\,{\ln \left (c\,x^n\right )}^3}{3\,n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 2.06, size = 384, normalized size = 2.89 \[ - \frac {a^{2} d^{2}}{x} + 2 a^{2} d e \log {\relax (x )} + a^{2} e^{2} x - \frac {2 a b d^{2} n \log {\relax (x )}}{x} - \frac {2 a b d^{2} n}{x} - \frac {2 a b d^{2} \log {\relax (c )}}{x} + 2 a b d e n \log {\relax (x )}^{2} + 4 a b d e \log {\relax (c )} \log {\relax (x )} + 2 a b e^{2} n x \log {\relax (x )} - 2 a b e^{2} n x + 2 a b e^{2} x \log {\relax (c )} - \frac {b^{2} d^{2} n^{2} \log {\relax (x )}^{2}}{x} - \frac {2 b^{2} d^{2} n^{2} \log {\relax (x )}}{x} - \frac {2 b^{2} d^{2} n^{2}}{x} - \frac {2 b^{2} d^{2} n \log {\relax (c )} \log {\relax (x )}}{x} - \frac {2 b^{2} d^{2} n \log {\relax (c )}}{x} - \frac {b^{2} d^{2} \log {\relax (c )}^{2}}{x} + \frac {2 b^{2} d e n^{2} \log {\relax (x )}^{3}}{3} + 2 b^{2} d e n \log {\relax (c )} \log {\relax (x )}^{2} + 2 b^{2} d e \log {\relax (c )}^{2} \log {\relax (x )} + b^{2} e^{2} n^{2} x \log {\relax (x )}^{2} - 2 b^{2} e^{2} n^{2} x \log {\relax (x )} + 2 b^{2} e^{2} n^{2} x + 2 b^{2} e^{2} n x \log {\relax (c )} \log {\relax (x )} - 2 b^{2} e^{2} n x \log {\relax (c )} + b^{2} e^{2} x \log {\relax (c )}^{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________